Added a comment: My config works now
authorincogshift <incogshift@web>
Sat, 4 Oct 2025 08:05:00 +0000 (08:05 +0000)
committeradmin <admin@branchable.com>
Sat, 4 Oct 2025 08:05:00 +0000 (08:05 +0000)
doc/forum/annex.largefiles_doesn__39__t_work_for_git_add/comment_1_132d155d5445745e5ee086370be48aad._comment [new file with mode: 0644]

diff --git a/doc/forum/annex.largefiles_doesn__39__t_work_for_git_add/comment_1_132d155d5445745e5ee086370be48aad._comment b/doc/forum/annex.largefiles_doesn__39__t_work_for_git_add/comment_1_132d155d5445745e5ee086370be48aad._comment
new file mode 100644 (file)
index 0000000..2055ee7
--- /dev/null
@@ -0,0 +1,30 @@
+[[!comment format=mdwn
+ username="incogshift"
+ avatar="http://cdn.libravatar.org/avatar/fe527f5047693f6657cd03a6893da975"
+ subject="My config works now"
+ date="2025-10-04T08:05:00Z"
+ content="""
+I have `.gitattributes`:
+
+```
+* annex.largefiles=nothing filter=annex
+*.pdf annex.largefiles=anything filter=annex
+```
+
+and git config:
+
+```
+[annex]
+       gitaddtoannex = true
+```
+
+Using `git add` now adds it to annex. This can be confirmed with
+
+```
+git annex info file.pdf
+```
+
+The output should show `present = true` at the end. If it wasn't added to annex, the output would show `fatal: Not a valid object name file.pdf`.
+
+And it seems that, by default, the files are stored in the working tree in their unlocked state. So `git add` doesn't replace the file with a symlink unlike `git annex add`
+"""]]